/*******************************************OVERVIEW****************************************************************
 
"Reassessing the Link between Revolutionary Threats and Democratization" 
 
Replication File
 
Table B2
 
  
********************************************************************************************************************/

clear
set more off
#delimit ;


/*Set Directory -- You will need to adjust this line of code accordingly */; 

cd "/Users/YourFiles/Replication/";

/*Create Log File*/;

log using "Table B2", replace text;


/*Load Data File*/;

use "open_seats.dta";

/*Merge With AF's data - You will need to download AF's replicaton files*/;

/* https://www.econometricsociety.org/publications/econometrica/browse/2015/03/01/democratization-under-threat-revolution-evidence-great-reform */;

/*Please use the data file data_seat.dta*/;


merge 1:1 seat_id using "/Users/YourFiles/11484_Data_and_Programs/data/data_seat.dta";

global reform "share1826 share1826_2 reform_1830";

sum reformer31;
sum reformer31 if open==0;
sum reformer31 if open==1;

sum constriots10, detail;
sum constriots10 if open==0, detail;
sum constriots10 if open==1, detail;

prob reformer31 constriots10 $reform, cluster(consid);
margins, dydx(constriots10) atmeans;

prob reformer31 constriots10 $reform if open==0, cluster(consid);
margins, dydx(constriots10) atmeans;

prob reformer31 constriots10 $reform if open==1, cluster(consid);
margins, dydx(constriots10) atmeans;



log c;
